﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using TraCuuDiemNhom3.Commons;

namespace TraCuuDiemNhom3
{
    public partial class SuccessLogin : System.Web.UI.Page
    {
        DataTable tb;
        protected void Page_Load(object sender, EventArgs e)
        {
            tb = TienIchSQL.ChayLenhSelectDuLieu("Select UserName, HoTen, Gioitinh, Ngaysinh, Chucvu from nguoidung n where n.UserName= @UserName ", "@UserName", TienIchWeb.LayTenDangNhap());
            lblUserName.Text = tb.Rows[0]["UserName"].ToString();
            lblHoten.Text = tb.Rows[0]["HoTen"].ToString();
            lblGioitinh.Text = tb.Rows[0]["Gioitinh"].ToString();
            lblNgaysinh.Text = tb.Rows[0]["Ngaysinh"].ToString();
            lblChucvu.Text = tb.Rows[0]["Chucvu"].ToString();

        }

        protected void btnDangxuat_Click(object sender, EventArgs e)
        {
            TienIchWeb.XoaThongTinDangNhap();
            Response.Redirect("Default.aspx");
        }
    }
}
